/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hk.adv.entity;

import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.modules.hk.sys.entity.goods.HkGoods;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 城市广告奖励配置Entity
 * @author 罗天文
 * @version 2018-03-20
 */
public class HkCityAdvGoods extends DataEntity<HkCityAdvGoods> {
	
	private static final long serialVersionUID = 1L;
	private HkCityAdv cityAdv;		// 城市广告id
	private HkCityAdvReward rewardId;		// 城市奖励配置id 父类
	private HkGoods goods;		// 物品id
	private String num;		// 数量
	private Date beginDate;		// 开始时间
	private Date endDate;		// 结束时间
	private String countryId;		// 国家
	private String provinceId;		// 省
	private String cityId;		// 市
	
	public HkCityAdvGoods() {
		super();
	}

	public HkCityAdvGoods(String id){
		super(id);
	}

	public HkCityAdvGoods(HkCityAdvReward rewardId){
		this.rewardId = rewardId;
	}

	@NotNull(message="城市广告id不能为空")
	public HkCityAdv getCityAdv() {
		return cityAdv;
	}

	public void setCityAdv(HkCityAdv cityAdv) {
		this.cityAdv = cityAdv;
	}
	
	@Length(min=0, max=32, message="城市奖励配置id长度必须介于 0 和 32 之间")
	public HkCityAdvReward getRewardId() {
		return rewardId;
	}

	public void setRewardId(HkCityAdvReward rewardId) {
		this.rewardId = rewardId;
	}
	
	@NotNull(message="物品id不能为空")
	public HkGoods getGoods() {
		return goods;
	}

	public void setGoods(HkGoods goods) {
		this.goods = goods;
	}
	
	@Length(min=0, max=11, message="数量长度必须介于 0 和 11 之间")
	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@Length(min=0, max=32, message="国家长度必须介于 0 和 32 之间")
	public String getCountryId() {
		return countryId;
	}

	public void setCountryId(String countryId) {
		this.countryId = countryId;
	}
	
	@Length(min=0, max=32, message="省长度必须介于 0 和 32 之间")
	public String getProvinceId() {
		return provinceId;
	}

	public void setProvinceId(String provinceId) {
		this.provinceId = provinceId;
	}
	
	@Length(min=0, max=32, message="市长度必须介于 0 和 32 之间")
	public String getCityId() {
		return cityId;
	}

	public void setCityId(String cityId) {
		this.cityId = cityId;
	}
	
}